;(async () => {
  const mysql = require('mysql2/promise')
  //设置链接配置
  const cfg = {
    host: 'localhost',
    user: 'root',
    passwrod: '1111',
    database: 'kkb',
  }
  const connection = await mysql.createConnection(cfg)
})()
